<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>26_案例练习-翻转数组-生成一个新数组</title>
    </head>
    <body>
        <script>
            var arr = [1,2,3,4,5];

            var new_arr = [];

            for(var i = arr.length - 1; i >= 0; i--){
                new_arr[new_arr.length] = arr[i];
            }

            console.log(new_arr);
        </script>
    </body>
</html>